package com.dmap.admin.service.backgroundv2;

import com.dmap.admin.controller.backgroundv2.param.DepartmentParam;
import com.dmap.admin.controller.backgroundv2.param.DepartmentSelectParam;
import com.dmap.admin.po.Department;

import java.util.List;

/**
 * \* User: helei
 * \* Date: 16/05/18
 * \* Description:部门相关接口
 * \
 */
public interface DepartmentService {

    Department insertDepartment(DepartmentParam param);

    boolean updateDepartment(DepartmentParam param);

    boolean deleteByIdList(List<Long> idList);

    Department selectById(Long id);

    /**
     * 验证 Name 或 CompanyId 是否已存在
     *
     * @param name      部门名称
     * @param companyId 部门所在公司ID
     * @return
     */
    boolean validateNameAndCompanyIdIsExist(String name, String companyId);

    int countByDepartmentSelectParam(DepartmentSelectParam param);

    List<Department> selectByDepartmentSelectParam(DepartmentSelectParam param);

}